package automaton;
import coins.*;

/////////////////////////////////////////////////// File CoinSortAutomaton.java ////////////////////////////////////////////////
public class CoinSortAutomaton {

private CoinStore toSort = new CoinStore(); ;
private CoinStore forEuro1= new CoinStore(); ;
private CoinStore forEuro2= new CoinStore(); ;
private CoinSort1 sort1;
private CoinSort2 sort2;

public static CoinSortAutomaton automaton = new CoinSortAutomaton();

private CoinSortAutomaton()
{
	sort1 = new CoinSort1(toSort, forEuro1);
	sort2 = new CoinSort2(toSort, forEuro2);
	sort1.setDaemon(true);
	sort2.setDaemon(true);
	sort1.start();
	sort2.start();
	
}

	public void throwInto (Coin c) {
		toSort.throwInto(c);
	}
	
	
	
	public void printResult() {
		forEuro2.printStoreContent();
		forEuro1.printStoreContent();
	}
}